Repository navigation
Load language packs from TranslationsPress - #804
Conversation
The plugin is no longer distributed through WordPress.org, so WordPress finds no language packs for it there. Offer the packs TranslationsPress builds for the plugin as translation updates instead. WordPress then downloads, installs and loads them as it did before. The list of packs is fetched only while WordPress stores the result of a plugin update check, and is cached for 12 hours (1 hour after a failure). Only packages hosted in our own TranslationsPress project are accepted. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
Test merged PR on Playground |
✅ Code Coverage Report
🎉 Great job maintaining/improving code coverage! 📊 File-level Coverage Changes (2 files)🆕 New Files
📈 Coverage Improved
ℹ️ About this report
|
🔍 WordPress Plugin Check Report
📊 Report
|
| 📍 Line | 🔖 Check | 💬 Message |
|---|---|---|
103 |
WordPressVIPMinimum.Performance.WPQueryParams.PostNotIn_post__not_in | Using exclusionary parameters, like post__not_in, in calls to get_posts() should be done with caution, see https://docs.wpvip.com/databases/optimize-queries/using-post__not_in/ for more information. |
📁 classes/suggested-tasks/providers/class-content-review.php (4 warnings)
| 📍 Line | 🔖 Check | 💬 Message |
|---|---|---|
232 |
WordPressVIPMinimum.Performance.WPQueryParams.PostNotIn_post__not_in | Using exclusionary parameters, like post__not_in, in calls to get_posts() should be done with caution, see https://docs.wpvip.com/databases/optimize-queries/using-post__not_in/ for more information. |
377 |
WordPressVIPMinimum.Performance.WPQueryParams.PostNotIn_post__not_in | Using exclusionary parameters, like post__not_in, in calls to get_posts() should be done with caution, see https://docs.wpvip.com/databases/optimize-queries/using-post__not_in/ for more information. |
381 |
WordPressVIPMinimum.Performance.WPQueryParams.PostNotIn_post__not_in | Using exclusionary parameters, like post__not_in, in calls to get_posts() should be done with caution, see https://docs.wpvip.com/databases/optimize-queries/using-post__not_in/ for more information. |
388 |
WordPressVIPMinimum.Performance.WPQueryParams.PostNotIn_post__not_in | Using exclusionary parameters, like post__not_in, in calls to get_posts() should be done with caution, see https://docs.wpvip.com/databases/optimize-queries/using-post__not_in/ for more information. |
📁 classes/activities/class-query.php (2 warnings)
| 📍 Line | 🔖 Check | 💬 Message |
|---|---|---|
71 |
PluginCheck.Security.DirectDB.UnescapedDBParameter | Unescaped parameter $table_name used in $wpdb->query()\n$table_name assigned unsafely at line 58. |
163 |
PluginCheck.Security.DirectDB.UnescapedDBParameter | Unescaped parameter $where_args used in $wpdb->get_results()\n$where_args assigned unsafely at line 153. |
📁 classes/suggested-tasks/data-collector/class-terms-without-description.php (1 warning)
| 📍 Line | 🔖 Check | 💬 Message |
|---|---|---|
108 |
PluginCheck.Security.DirectDB.UnescapedDBParameter | Unescaped parameter $query used in $wpdb->get_results()\n$query assigned unsafely at line 106. |
📁 classes/suggested-tasks/data-collector/class-yoast-orphaned-content.php (1 warning)
| 📍 Line | 🔖 Check | 💬 Message |
|---|---|---|
111 |
PluginCheck.Security.DirectDB.UnescapedDBParameter | Unescaped parameter $query used in $wpdb->get_row()\n$query assigned unsafely at line 98. |
📁 classes/suggested-tasks/data-collector/class-terms-without-posts.php (1 warning)
| 📍 Line | 🔖 Check | 💬 Message |
|---|---|---|
120 |
PluginCheck.Security.DirectDB.UnescapedDBParameter | Unescaped parameter $query used in $wpdb->get_results()\n$query assigned unsafely at line 118. |
🤖 Generated by WordPress Plugin Check Action • Learn more about Plugin Check
|
The failing Plugin Check reports one error in
It triggers on the The rule exists for plugins hosted on WordPress.org, which this plugin no longer is. The check could be made green by adding All other checks pass. The first failure of this job was unrelated: the 🤖 Posted by Claude Code |
The TranslationsPress language packs hook pre_set_site_transient_update_plugins, which Plugin Check reports as plugin_updater_detected and update_modification_detected. That rule is for plugins hosted on WordPress.org, and this plugin was closed there on 2026-10-26. Ignore only those two codes so the rest of the check keeps running. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Reviewed, with one change pushed in 842386a. Plugin Check is green now, and so is the rest of CI. What changed: Plugin Check ignores only the two updater codes. Checked, no change needed:
Follow-up outside this PR: WordPress.org still lists packs for |
Why
The plugin is no longer distributed through WordPress.org, so WordPress finds no language packs for it there. Every site that doesn't already have a pack shows the plugin in English, and existing packs never update.
TranslationsPress already builds language packs for the plugin and publishes them at
https://packages.translationspress.com/progress-planner/progress-planner/packages.json.What
A new
Progress_Planner\Translationsclass hookspre_set_site_transient_update_pluginsand adds our language packs to thetranslationslist WordPress keeps with its plugin update data. From there WordPress core does the rest: the packs show under Dashboard → Updates, install with automatic translation updates, land inwp-content/languages/plugins/, and load just in time. The text domain is unchanged.updateddate is newer than the installed file'sPO-Revision-Date.Testing
Translations_Test(13 tests): offering a pack, the installed-date comparison, keeping other plugins' updates, no duplicates on a second run, rejecting foreign package URLs, and caching of success and failure responses.wp_update_plugins(), core listed one translation update fornl_NL,Language_Pack_Upgraderinstalled it, a fresh request rendered "Recommendations" as "Aanbevelingen", and a second update check no longer offered the pack.Notes for the reviewer
nl_NL. Its metadata says version 1.9.1, updated 2026-02-20, but the zip it serves contains 1.10.x strings and aPO-Revision-Dateof today. The comparison uses the feed'supdateddate, so a site that already has a pack newer than that date is not offered the TranslationsPress one until the feed's date advances.readme.txt/CHANGELOG.mdyet.🤖 Generated with Claude Code